<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:hr="http://java.sun.com/jsf/composite/autocomplete">

    <h:body>

        <ui:composition template="/resources/template/template.xhtml">

            <ui:define name="content">

                <h:form >
                    <p:panel  >
                        <f:facet name="header" >
                            <h:outputLabel value="Leave Report Detail By Staff" />
                        </f:facet>
                        <h:panelGrid columns="2" styleClass="alignTop" >
                            <h:outputLabel value="From : " />
                            <p:calendar value="#{hrReportController.fromDate}" pattern="dd MMMM yyyy hh:mm:ss a" />
                            <h:outputLabel value="To : " />
                            <p:calendar value="#{hrReportController.toDate}" pattern="dd MMMM yyyy hh:mm:ss a" />
                            <h:outputLabel value="Staff : "/>
                            <hr:completeStaff value="#{hrReportController.reportKeyWord.staff}"/>                          
                        </h:panelGrid>

                        <p:commandButton ajax="false" value="Process" action="#{hrReportController.createStaffLeaveDetail()}"/>
                        <p:commandButton ajax="false" value="Excel" styleClass="noPrintButton" onclick="onSubmitButton();" >
                            <pe:exporter type="xlsx" target="tb1, tb2, tb3, tb4, tb5, tb6, tb7, tb8" fileName="hr_report_leave_summery_by_staff"  />
                        </p:commandButton>
                        <p:commandButton value="Print" ajax="false" action="#" >
                            <p:printer target="gpBillPreview" ></p:printer>
                        </p:commandButton>

                        <p:commandButton ajax="false" rendered="#{hrReportController.backButtonPage ne null}" value="Back" action="#{hrReportController.back()}"/>


                        HHHH****#{hrReportController.backButtonPage}****HHHHH

                        <p:panel id="gpBillPreview" styleClass="noBorder summeryBorder">                     
                            <p:dataTable id="tb1" value="#{hrReportController.staffLeavesAnnual}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header">
                                    <h:outputLabel value="#{sessionController.loggedUser.institution.name}" /><br></br>
                                    <h:outputLabel value="Leave Report Detail By Staff "/><br/>
                                    <h:outputLabel value="  From : "  />
                                    <h:outputLabel  value="#{hrReportController.fromDate}" >
                                        <f:convertDateTime pattern="dd MM yy "/>
                                    </h:outputLabel>
                                    <h:outputLabel/>
                                    <h:outputLabel/>
                                    <h:outputLabel value="  To : "/> 
                                    <h:outputLabel  value="#{hrReportController.toDate}">
                                        <f:convertDateTime pattern="dd MM yy "/>
                                    </h:outputLabel><br/>
                                    <h:panelGroup rendered="#{hrReportController.reportKeyWord.staff ne null}" >
                                        <h:outputLabel value="Staff : #{hrReportController.reportKeyWord.staff.person.name}"/>
                                        <br/>
                                    </h:panelGroup>
                                </f:facet>
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="Annual "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.annualEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.annualUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.annualEntitle - hrReportController.annualUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <f:facet name="header">
                                        <h:outputLabel value="Staff No"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <f:facet name="header">
                                        <h:outputLabel value="Staff Name"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <f:facet name="header">
                                        <h:outputLabel value="Leave Date"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <f:facet name="header">
                                        <h:outputLabel value="Leave Qty"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <f:facet name="header">
                                        <h:outputLabel value="Created at"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <f:facet name="header">
                                        <h:outputLabel value="Comments"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb2" value="#{hrReportController.staffLeavesCashual}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="Casual "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.casualEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.casualUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.casualEntitle - hrReportController.casualUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}" rendered="#{hrReportController.reportKeyWord.staff eq null}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}" rendered="#{hrReportController.reportKeyWord.staff eq null}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;">
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine" >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb3" value="#{hrReportController.staffLeavesNoPay}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="No Pay "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.nopayEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.nopayUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.nopayEntitle - hrReportController.nopayUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb4" value="#{hrReportController.staffLeavesDutyLeave}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="Duty Leave "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.dutyLeaveEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.dutyLeaveUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.dutyLeaveEntitle - hrReportController.dutyLeaveUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb5" value="#{hrReportController.staffLeavesLieu}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="Lieu Leave "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.lieuEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.lieuUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.lieuEntitle - hrReportController.lieuUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb6" value="#{hrReportController.staffLeavesMedical}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="Medical Leave "/>
                                        <h:outputLabel value="Entitle - #{hrReportController.medicalEntitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.medicalUtilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.medicalEntitle - hrReportController.medicalUtilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"   rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date"  style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb7" value="#{hrReportController.staffLeavesMaternity1st}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="1&lt;sup&gt;st&lt;&#47;sup&gt; Maternity Leave" escape="false"/>
                                        <h:outputLabel value="Entitle - #{hrReportController.maternity1Entitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.maternity1Utilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.maternity1Entitle - hrReportController.maternity1Utilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}" rendered="#{hrReportController.reportKeyWord.staff eq null}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column> 

                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>
                            <p:dataTable id="tb8" value="#{hrReportController.staffLeavesMaternity2nd}" var="ss" emptyMessage="Not taken">
                                <f:facet name="header" >
                                    <h:panelGrid columns="4" style="border-style: hidden!important" columnClasses="firstOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns, othersOfTitleAndThreeColumns">
                                        <h:outputLabel value="2&lt;sup&gt;nd&lt;&#47;sup&gt; Maternity Leave" escape="false"/>
                                        <h:outputLabel value="Entitle - #{hrReportController.maternity2Entitle}"/>
                                        <h:outputLabel value="Utilized - #{hrReportController.maternity2Utilized}"/>
                                        <h:outputLabel value="Balance - #{hrReportController.maternity2Entitle - hrReportController.maternity2Utilized}"/>
                                    </h:panelGrid>
                                </f:facet>
                                <p:column headerText="Staff No" style="width: 70px!important;max-width: 70px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.code}"></p:outputLabel>
                                </p:column>
                                <p:column headerText="Staff Name" style="width: 200px!important;max-width: 200px;" styleClass="singleLine"  rendered="#{hrReportController.reportKeyWord.staff eq null}">
                                    <p:outputLabel value="#{ss.staff.person.nameWithTitle}"></p:outputLabel>
                                </p:column>                                                            

                                <p:column headerText="Leave Date" style="width: 110px;">
                                    <p:outputLabel value="#{ss.leaveDate}">
                                        <f:convertDateTime pattern="dd MMM yy (E)" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column>  
                                <p:column headerText="Leave Qty"  style="width: 90px;">
                                    <p:outputLabel value="#{ss.qty}"></p:outputLabel>
                                </p:column> 
                                <p:column headerText="Created at" style="width: 130px;" >
                                    <p:outputLabel value="#{ss.createdAt}">
                                        <f:convertDateTime pattern="dd MM yy - hh:mm a" ></f:convertDateTime>
                                    </p:outputLabel>
                                </p:column> 
                                <p:column  headerText="Crated By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Crated By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.creater.webUserPerson.name}"></p:outputLabel>
                                </p:column>  
                                <p:column  headerText="Approved By" style="width: 170px!important;max-width: 170px;" styleClass="singleLine"  >
                                    <f:facet name="header">
                                        <h:outputLabel value="Approved By"/>
                                    </f:facet>
                                    <p:outputLabel value="#{ss.form.approvedStaff.person.name}"></p:outputLabel>
                                </p:column>  
                                <p:column headerText="Comments" >
                                    <p:outputLabel value="#{ss.form.comments}"></p:outputLabel>
                                </p:column>  

                                <f:facet name="footer">
                                    <p:outputLabel value="Print By : #{sessionController.loggedUser.webUserPerson.name} - " />
                                    <p:outputLabel value="Print At : " />
                                    <p:outputLabel value="#{commonController.currentDateTime}" >
                                        <f:convertDateTime pattern="yyyy MMMM dd hh:mm:ss a " />
                                    </p:outputLabel>
                                </f:facet>
                            </p:dataTable>
                            <p:spacer width="30px"></p:spacer>


                        </p:panel>


                    </p:panel>

                </h:form>
            </ui:define>

        </ui:composition>

    </h:body>
</html>
